package Demo2;

import Demo4.IFlying;
import Demo4.IRuning;
import Demo4.ISwimming;

import java.sql.SQLOutput;

/*
 *Description:
 *User:laoHu
 *Created with Intellij IDEA 2025
 *Data:2025.05.00
 *Time:00:00
 */
public class Duck extends Animal implements IFlying, IRuning, ISwimming {

    public Duck(String name, int age) {
        super(name, age);
    }

    @Override
    public void eat() {
        System.out.println(this.name + "在吃小鱼...");
    }

    @Override
    public void fly() {
        System.out.println(this.name + "在飞耶....");
    }

    @Override
    public void run() {
        System.out.println(this.name + "在跑啊....");
    }

    @Override
    public void swim() {
        System.out.println(this.name + "在悠闲的游泳....");
    }
}
